  <!-- Header Area -->
<headerbar></headerbar>

<!-- navbar Ara -->
<navbar></navbar>

<div class="mainbody">
    <div class="maincontent row">
        <!--我是主要内容 start-->
        <div class="col-sm-12">
            <div class="jumbotron">
                <div class="col-sm-2 "></div>
                <h2 class="text-center">The List Of Complaints</h2>
                <p class="text-center">odperated complaints from customer to merchant</p>
            </div>
        </div>
        <!--我是主要内容 end-->
        <div class="col-sm-1"></div>
        <div class="col-sm-9">
            <table class="table table-hover table-condensed">
                <thead>
                    <tr>
                        <th rowspan="1"><input type="checkbox" ng-model="vm.allChecked" ng-change="vm.checkAll(vm.allChecked)" /></th>
                        <th rowspan="1">merchant-portrait</th>
                        <th rowspan="2">complained-merchant</th>
                        <th rowspan="1">from-customer</th>
                        <th rowspan="2">reason</th>
                        <th rowspan="1">status</th>
                        <th rowspan="2">complain-time</th>
                        <th rowspan="2">deal-time</th>
                    </tr>
                </thead>

                <tbody ng-controller="complaintsController as vm">
                    <tr ng-repeat="item in vm.complaintslist">
                        <td><input type="checkbox" ng-model="item.$checked" /></td>
                        <td><img style="width:50px;" ng-src='{{item.merchant.portraitUrl}}' class="text-center"></td>
                        <td>{{item.merchant.name}}</td>
                        <td>{{item.cname}}</td>
                        <td>{{item.reason}}</td>
                        <td ng-if="item.status==1" style="color:dodgerblue">Be ignored</td>
                        <td ng-if="item.status==2">
                            <button class="btn btn-info" ng-click="vm.update('1', $index)">忽略</button>
                            <button class="btn btn-danger" ng-click="vm.update('3', $index)">拉黑</button>
                        </td>
                        <td ng-if="item.status==3" style="color:red">Be blocked</td>
                        <td>{{item.complaintsTime  | date: 'yyyy-MM-dd HH:mm:ss' }}</td>
                        <td>{{item.dealTime  | date: 'yyyy-MM-dd HH:mm:ss' }}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>